/*
 * 
 * 
 */
package Controller.CoreServlet.Ultility;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.*;
import javax.servlet.*;

/**
 *
 * @author chickencake1
 */
public class SSCookie_Login {
    public static boolean check_cookieLoginInfo(HttpServletRequest request,String cookieName)
    {
        Cookie [] cookie = request.getCookies();
        for(int i=0;i<cookie.length;i++)
        {
            if(cookieName.equals(cookie[i].getName()))
                return true;
        }
        return false;
    }
    public static boolean  check_cookieLoginInfo_Another(HttpServletRequest request,String cookieName)
    {
                Cookie [] cookie = request.getCookies();
        for(int i=0;i<cookie.length;i++)
        {
            if(cookieName.equals(cookie[i].getName()))
                return true;
        }
        return false;
    }
}
